package ec.atreasure.com.ec.main;

import android.graphics.Color;

import java.util.LinkedHashMap;

import ec.atreasure.com.core.fragments.bottom.BaseBottomFragment;
import ec.atreasure.com.core.fragments.bottom.BottomItemBuilder;
import ec.atreasure.com.core.fragments.bottom.BottomItemFragment;
import ec.atreasure.com.core.fragments.bottom.BottomTabBean;
import ec.atreasure.com.ec.main.cart.CartFragment;
import ec.atreasure.com.ec.main.discover.DiscoverFragment;
import ec.atreasure.com.ec.main.index.IndexFragment;
import ec.atreasure.com.ec.main.personal.PersonalFragment;
import ec.atreasure.com.ec.main.sort.SortFragment;

/**
 * Description :主页界面
 * Created by wangjin on 2019/7/7.
 * Job number：
 * Phone ：18301070822
 * Email： 120182051@qq.com
 * Person in charge : 汪渝栋
 * Leader：
 */
public class HomeFragment extends BaseBottomFragment {
    @Override
    public LinkedHashMap<BottomTabBean, BottomItemFragment> setItems(BottomItemBuilder bottomItemBuilder) {
        final LinkedHashMap<BottomTabBean,BottomItemFragment> items = new LinkedHashMap<>();
        items.put(new BottomTabBean("{fa-home}","主页"), new IndexFragment());
        items.put(new BottomTabBean("{fa-sort}","分类"), new SortFragment());
        items.put(new BottomTabBean("{fa-compass}","发现"), new DiscoverFragment());
        items.put(new BottomTabBean("{fa-shopping-cart}","购物车"), new CartFragment());
        items.put(new BottomTabBean("{fa-user}","我的"), new PersonalFragment());
        return bottomItemBuilder.addItems(items).getItems();
    }

    @Override
    public int setIndexFragment() {
        return 0;
    }

    @Override
    public int setSelectColor() {
        return Color.parseColor("#ffff8800");
    }
}
